// Bachelor of Software Engineering 
// Media Design School 
// Auckland
// New Zealand
// 
// (c) 2005 - 2014 Media Design School 
// 
// File Name : Foundation.h
// Description : Foundation header
// Author : Serge Radinovich
// Mail : srad015@hotmail.com

#pragma once

#include "CardPileGroup.h"
#include "Move.h"

//4 Piles of cards on top right of screen
class Foundation : public CardPileGroup
{
	
	bool ValidCardDeposit(const Card* const _pCard, const int _iPile) const;

public:

	static const int s_s_kiTop = 50;		//Position of top Y value of all piles
	static const int s_s_kiLeft = 310;		//Position of left-most X value of left-most pile

	static const int s_kiDistBetweenPiles = 100;		//Horizontal distance between piles

	Foundation(void);
	~Foundation(void);

	void ArrangeCardPositions();
	bool GameWon();

	//Overloaded pure virtuals from CardPileGroup
	void Draw();
	std::list<Card*>* AttemptCardGrab(Vector2 _clickPos, std::list<Card*>* grabbedCards);
	bool AttemptCardDeposit(Vector2 _clickPos, std::list<Card*>* _pGrabbedCards,  std::list<Card*>* &_pListDepositedTo);
	void UndoMove(Move* _move);
};

